package com.umeng.community.example.Utils;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;

public class UrlUtils
{
    public static String getURL(String url, HashMap<String, String> map)
    {
        StringBuffer str = new StringBuffer();
        str.append(url);
        str.append("?");
        Set<String> keySet = map.keySet();
        Iterator<String> iterator = keySet.iterator();
        while (iterator.hasNext())
        {
            str.append("&");
            String key = iterator.next();
            str.append(key);
            str.append("=");
            String value = map.get(key);
            str.append(value);
        }
        return str.toString();
    }
    
}
